package day1102_2;

import java.util.Scanner;//1.
public class F1 {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        System.out.println("请输入火车代号(D表示动车，P表示普通列车)");
        char  train=s.next().charAt(0);
        double seatPrice=60;
        System.out.println( "请输入座位等级：");
        int seat=s.nextInt();
        if(train=='D'){
            if(seat==1){
                System.out.println("您的票价为：" + seatPrice*2);
            }else if(seat==2){
                System.out.println("您的票价为：" + seatPrice*1.5);
            }
        }else{
            if(seat==3){
                System.out.println("您的票价为：" + seatPrice);
            }else if(seat==4){
                System.out.println("您的票价为：" + seatPrice*1.8);
            }
        }
    }
}


